home *** CD-ROM | disk | FTP | other *** search
Text File | 1995-06-24 | 9.7 KB | 397 lines | [TEXT/MPS ] |
- /*
- File: PIGeneral.r
-
- Copyright 1991-95 by Adobe Systems Inc. All rights reserved.
-
- */
-
- #ifndef __PIGeneral.r__
- #define __PIGeneral.r__
-
- #ifndef kPIPropertiesVersion
- #define kPIPropertiesVersion 0
- #endif
-
- type 'PiPL'
- {
- longint = kPIPropertiesVersion;
- longint = $$CountOf(properties);
- array properties
- {
- switch
- {
-
- /* Properties for all types of plug-ins. */
-
- case Kind:
- longint = '8BIM';
- key longint = 'kind';
- longint = 0;
- longint = 4;
- longint Filter = '8BFM', Parser = '8BYM', ImageFormat='8BIF',
- Extension = '8BXM', Acquire = '8BAM', Export = '8BEM';
-
- case Version:
- longint = '8BIM';
- key longint = 'vers';
- longint = 0;
- longint = 4;
- longint;
-
- case Priority:
- longint = '8BIM';
- key longint = 'prty';
- longint = 0;
- longint = 4;
- longint;
-
- case RequiredHost:
- longint = '8BIM';
- key longint = 'host';
- longint = 0;
- longint = 4;
- longint;
-
- case Name:
- longint = '8BIM';
- key longint = 'name';
- longint = 0;
- longint = (nameEnd[$$ArrayIndex(properties)] - nameStart[$$ArrayIndex(properties)]) / 8;
- nameStart:
- pstring;
- nameEnd:
- align long;
-
- case Category:
- longint = '8BIM';
- key longint = 'catg';
- longint = 0;
- longint = (catgEnd[$$ArrayIndex(properties)] - catgStart[$$ArrayIndex(properties)]) / 8;
- catgStart:
- pstring;
- catgEnd:
- align long;
-
- case Code68k:
- longint = '8BIM';
- key longint = 'm68k';
- longint = 0;
- longint = 6;
- longint;
- integer;
- align long;
-
- case CodePowerPC:
- longint = '8BIM';
- key longint = 'pwpc';
- longint = 0;
- longint = (pwpcEnd[$$ArrayIndex(properties)] - pwpcStart[$$ArrayIndex(properties)]) / 8;
- pwpcStart:
- longint;
- longint;
- pstring;
- pwpcEnd:
- align long;
-
- case SupportedModes:
- longint = '8BIM';
- key longint = 'mode';
- longint = 0;
- longint = (modeEnd[$$ArrayIndex(properties)] - modeStart[$$ArrayIndex(properties)]) / 8;
- modeStart:
- wide array modeData { byte; };
- modeEnd:
- align long;
-
- /* Filter plug-in properties. */
-
- case FilterCaseInfo:
- longint = '8BIM';
- key longint = 'fici';
- longint = 0;
- longint = 28;
- array [7]
- {
- byte inCantFilter = 0,
- inStraightData = 1,
- inBlackMat = 2,
- inGrayMat = 3,
- inWhiteMat = 4,
- inDefringe = 5,
- inBlackZap = 6,
- inGrayZap = 7,
- inWhiteZap = 8,
- inBackgroundZap = 10,
- inForegroundZap = 11;
- byte outCantFilter = 0,
- outStraightData = 1,
- outBlackMat = 2,
- outGrayMat = 3,
- outWhiteMat = 4,
- outFillMask = 9;
- fill bit [5];
- boolean doesNotFilterLayerMasks, filtersLayerMasks;
- boolean doesNotWorkWithBlankData, worksWithBlankData;
- boolean copySourceToDestination, doNotCopySourceToDestination;
- fill byte;
- } ;
-
- /* Format plug-in properties. */
-
- case FmtFileType:
- longint = '8BIM';
- key longint = 'fmTC';
- longint = 0;
- longint = 8;
- longint; /* Default file type. */
- longint; /* Default file creator. */
-
- case ReadTypes:
- longint = '8BIM';
- key longint = 'RdTy';
- longint = 0;
- longint = $$CountOf(ReadableTypes) * 8;
- wide array ReadableTypes {longint; longint; } ;
-
- case WriteTypes:
- longint = '8BIM';
- key longint = 'WrTy';
- longint = 0;
- longint = $$CountOf(WritableTypes) * 8;
- wide array WritableTypes {longint; longint; } ;
-
- case FilteredTypes:
- longint = '8BIM';
- key longint = 'fftT';
- longint = 0;
- longint = $$CountOf(FilteredTypes) * 8;
- wide array FilteredTypes {longint; longint; } ;
-
- case ReadExtensions:
- longint = '8BIM';
- key longint = 'rdEx';
- longint = 0;
- longint = $$CountOf(ReadableExtensions) * 4;
- wide array ReadableExtensions { longint; } ;
-
- case WriteExtensions:
- longint = '8BIM';
- key longint = 'wrEx';
- longint = 0;
- longint = $$CountOf(WriteableExtensions) * 4;
- wide array WriteableExtensions { longint; } ;
-
- case FilteredExtensions:
- longint = '8BIM';
- key longint = 'fftE';
- longint = 0;
- longint = $$CountOf(FilteredExtensions) * 4;
- wide array FilteredExtensions {longint; } ;
-
- case FormatFlags:
- longint = '8BIM';
- key longint = 'fmtf';
- longint = 0;
- longint = (fmtFlagsEnd[$$ArrayIndex(properties)] - fmtFlagsStart[$$ArrayIndex(properties)]) / 8;
- fmtFlagsStart:
- wide array fmtFlagsData { byte; };
- fmtFlagsEnd:
- align long;
-
- case FormatMaxSize:
- longint = '8BIM';
- key longint = 'mxsz';
- longint = 0;
- longint = 4;
- Point;
-
- case FormatMaxChannels:
- longint = '8BIM';
- key longint = 'mxch';
- longint = 0;
- longint = $$CountOf(ChannelsSupported) * 2;
- wide array ChannelsSupported { integer; } ;
- align long;
-
- /* Parser Properties. */
-
- case ParsableTypes:
- longint = '8BIM';
- key longint = 'psTY';
- longint = 0;
- longint = $$CountOf(ParsableTypes) * 8;
- wide array ParsableTypes {longint; longint; } ;
-
- case ParsableExtensions:
- longint = '8BIM';
- key longint = 'psEX';
- longint = 0;
- longint = $$CountOf(ParsableExtensions) * 4;
- wide array ParsableExtensions { longint; };
-
- case FilteredParsableTypes:
- longint = '8BIM';
- key longint = 'psTy';
- longint = 0;
- longint = $$CountOf(ParsableTypes) * 8;
- wide array ParsableTypes {longint; longint; } ;
-
- case FilteredParsableExtensions:
- longint = '8BIM';
- key longint = 'psEx';
- longint = 0;
- longint = $$CountOf(ParsableExtensions) * 4;
- wide array ParsableExtensions { longint; };
-
- case ParsableClipboardTypes:
- longint = '8BIM';
- key longint = 'psCB';
- longint = 0;
- longint = $$CountOf(ParsableClipboardTypes) * 4;
- wide array ParsableClipboardTypes { longint; };
-
- };
- };
- };
-
- /********************************************************************************/
-
- #ifndef PiMIVersion
- #define PiMIVersion 0
- #endif
-
- type 'PiMI'
- {
- Start: /* The following is common to all Photoshop 2.5 Plugin modules */
- integer; /* The version number of the interface supported. */
- integer; /* The sub-version number. */
- integer; /* The plug-in's priority. */
- integer = (General-Start)/8; /* The size of the general info. */
- integer = (TypeInfo-General)/8; /* The size of the type specific info. */
- integer; /* A bit mask indicating supported image modes. */
- literal longint; /* A required host if any. */
- General:
-
- array { /* The following is used only for Format Plugin modules */
- integer = $$Countof(TypeArray); /* type count */
- integer = $$Countof(ExtensionArray); /* extension count */
- byte cannotRead, canRead; /* Can we read using this format? */
- byte cannotReadAll, canReadAll; /* Can this plug-in read from all files? */
- byte cannotWrite, canWrite; /* Can we write using this format? */
- byte cannotWriteIfRead, canWriteIfRead; /* Can we write if we read using this format? */
- byte doesntSaveResources, savesResources; /* Does this file format save the resource data? */
- #if PiMIVersion > 0
- byte doesntSupportsFilterCalls, supportsFilterCalls; /* Supports filter calls for formats. */
- #else
- fill byte; /* Padding */
- #endif
- wide array [16]
- { integer; }; /* Maximum # of channels with each plug-in mode. */
- integer; /* Maximum rows allowed in document. */
- integer; /* Maximum columns allowed in document. */
- literal longint; /* The file type if we create a file. */
- literal longint; /* The creator type if we create a file. */
- array TypeArray
- {
- literal longint; /* The type-creator pairs supported. */
- literal longint;
- };
- array ExtensionArray
- {
- literal longint; /* The extensions supported. */
- };
- };
-
- array { /* The following is used only for filter plug-in modules. */
- byte dontCopySourceToDestination, copySourceToDestination;
- };
- TypeInfo:
- };
-
- #define supportsBitmap 1
- #define supportsGrayScale 2
- #define supportsIndexedColor 4
- #define supportsRGBColor 8
- #define supportsCMYKColor 16
- #define supportsHSLColor 32
- #define supportsHSBColor 64
- #define supportsMultichannel 128
- #define supportsDuotone 256
- #define supportsLABColor 512
-
- #define flagSupportsBitmap 128
- #define flagSupportsGrayScale 64
- #define flagSupportsIndexedColor 32
- #define flagSupportsRGBColor 16
- #define flagSupportsCMYKColor 8
- #define flagSupportsHSLColor 4
- #define flagSupportsHSBColor 2
- #define flagSupportsMultichannel 1
- #define flagSupportsDuotone 128
- #define flagSupportsLABColor 64
-
- #define latestAcquireVersion 4
- #define latestAcquireSubVersion 0
- #define latestExportVersion 4
- #define latestExportSubVersion 0
- #define latestExtensionVersion 1
- #define latestExtensionSubVersion 0
- #define latestFilterVersion 4
- #define latestFilterSubVersion 0
- #define latestFormatVersion 1
- #define latestFormatSubVersion 0
- #define latestParserVersion 1
- #define latestParserSubVersion 0
-
-
- #if 0
-
- /* Example of Format plugin resource */
-
- resource 'PiMI' (16000, purgeable)
- {
- latestFormatVersion, /* Version, subVersion, and priority of the interface */
- latestFormatSubVersion,
- 0,
- supportsGrayScale+supportsRGBColor+supportsCMYKColor,
- '8BIM',
-
- {
- canRead,
- cannotReadAll,
- canWrite,
- canWriteIfRead,
- doesntSaveResources,
- { 0, 1, 0, 3,
- 4, 0, 0, 0,
- 0, 0, 0, 0,
- 0, 0, 0, 0 },
- 32767,
- 32767,
- 'JPEG',
- '8BIM',
- {
- 'JPEG', '8BIM'
- },
- {
- 'JPG '
- }
- }
- };
-
- /* Example of Acquire/Export resource */
-
- resource 'PiMI' (16001, purgeable)
- {
- latestAcquireVersion, /* Version, subVersion, and priority of the interface */
- latestAcquireSubVersion,
- 0,
- supportsGrayScale+supportsRGBColor+supportsCMYKColor,
- '8BIM',
- {} /* Null Format extension field */
- };
-
- #endif
-
- #endif
-